package com.kob.backend.controller.order;

import com.kob.backend.mapper.OrdersMapper;
import com.kob.backend.pojo.orders;
import com.kob.backend.service.order.OrderGetinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class OrderGetinfoController {
    @Autowired
    private OrderGetinfoService orderGetinfoService;
    @Autowired
    private OrdersMapper ordersMapper;
   @GetMapping("/order/getinfo/")
    public List<orders> getorderinfo(@RequestParam Map<String,String>map){
       Integer userid=Integer.parseInt(map.get("userid"));
       return orderGetinfoService.getorderinfo(userid);
   }
}
